1. Field of the Invention
The invention is related to the field of transcoding systems and, in particular, to transcoding of Run Length Limited (RLL) encoded datastreams.
2. Statement of the Problem
Print data transmitted between various processes within a printing system is typically encoded to reduce the amount of bandwidth utilized to transmit the print data and/or the data storage requirements for storing the data. Before the encoded print data is printed, the print data is decoded and screened using a “halftone” process before being sent to a print engine. Halftoning is a reprographic technique that simulates a continuous tone image with dots, where the dots may vary either in size and/or in spacing. Where continuous tone images may contain an infinite range of colors or grays, a halftone image typically generated by a printing system is a binary image comprising a limited set of colors such as black, Cyan, Magenta, Yellow, and Key black (CMYK), or Red Green Blue (RGB). This type of binary reproduction relies on the optical illusion that tiny dots can generate smooth image tones when viewed by the human eye, thus appearing to be a continuous tone image to the viewer.
Halftoning uses a high frequency/low frequency dichotomy to generate a continuous tone illusion from a halftone image. In halftoning, the low frequency component is a local area of the output image designated as a halftone cell. Each halftone cell relates to a corresponding area (size and location) of the continuous tone input image. Within each halftone cell, the high frequency component is a variable-sized halftone dot composed of ink or toner. The ratio of the inked area to the non-inked area within the halftone cell represents the luminosity of the corresponding area on the continuous tone input image. From a distance, the human eye averages both the high frequency component corresponding to the ink ratio within the halftone cell and the low frequency component corresponding to the size of the halftone cell.
In digital halftoning, a raster image processor generates a raster image, or bitmap, which comprises a 2-dimensional array of pixels. Each pixel may be either on or off, ink or no ink. In order to simulate the halftone cell, the digital halftone cell contains groups of monochrome (e.g., black) or limited color pixels (e.g., CMYK) within the same sized halftone area. The location and sizes of the monochrome or limited color pixels within the digital halftone cell represent the high frequency/low frequency dichotomy of the halftone method described above.
In a typical digital printing system, Page Description Language (PDL) data, such as PostScript data, PDF (Portable Document Format) data, Intelligent Printer Data Stream (IPDS) data, Advanced Function Presentation (AFP) data, Mixed Object: Document Content Architecture (MODCA) data, or other types of PDL data is rasterized and converted into bitmap data (i.e., a 2-dimensional array of pixels). Monochrome data may be represented by a single 2-dimensional array of pixels, while color data may be represented by multiple 2-dimensional arrays of pixels, one for each color. The bitmap data may then be encoded to reduce the amount of data used to represent the bitmap while transmitting the bitmap data through various post rasterizing processes within the printing system. After rasterizing and encoding, the bitmap data is decoded and halftoned using a halftone screen before being sent to a print engine for printing. The halftone screen, when applied to the bitmap data, defines the characteristics of the halftone cells used to represent the final output image.
One type of data encoding used by printing systems to reduce the amount of data used to represent the bitmap data is Run Length Limited (RLL) encoding. RLL encoding is a lossless compression scheme, which bounds the length of runs of repeat data during which the signal does not change. Apple Computer, Inc. introduced an RLL encoding scheme with the release of the Macintosh® computer called PackBits. A PackBits datastream includes packets with a one-byte header followed by one or more bytes of data. The header is a signed byte and defines the following data bytes as either literal data or repeat data. The header also defines the number of bytes of encoded literal data or encoded repeat data. In other words, the header encodes both the type of data (literal or repeat) and the amount of encoded data (the number of data bytes subsequent to the header).
One problem with associating halftone screen information with data within an RLL datastream, such as PackBits, is that the data is encapsulated in the RLL format, which renders associations difficult without first decoding the datastream. However, such decoding merely for associating the data with halftone screen information may entail significant hardware processing resources, which may not be available.